package demo_0423;

import java.util.*;

public class MyList {
    public static void main(String[] args) {
        List<String> color = new ArrayList<>(Arrays.asList("red", "green", "blue", "yellow", "black",
                "white", "gray", "orange", "purple", "brown"));
        System.out.println(color.subList(3, 7));
        color.add( 3,"pink");

        Collections.sort(color);
        System.out.println(color);
        Collections.shuffle(color);
        System.out.println(color);
        Collections.reverse(color);
        System.out.println(color);
    }
}
